package com.sailing.xjpb.dict.entity.po;

import com.sailing.xjpb.common.operator.Operator;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * (DICTIONARY) 系统字典表
 *
 * @author YaoWei
 * @versi createTime 1.0.0 2020-12-07
 */
@Entity
@Table(name = "SYS_DICTIONARY")
@Data
public class DictionaryPO implements Serializable, Operator {

    /**
     * 版本号
     */
    private static final long serialVersionUID = 2533694781518880148L;
    /**
     * 主键
     */
    @Id
    @GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @Column(name = "ID", unique = true, nullable = false, length = 64)
    private String id;
    /**
     * 分类
     */
    @Column(name = "CLASSIFY_CODE", length = 64)
    private String type;

    /**
     * 分类名称
     */
    @Column(name = "CLASSIFY_NAME", length = 64)
    private String classify;

    /**
     * 父ID
     */
    @Column(name = "PARENT_ID", length = 64)
    private String pid;

    /**
     * 父code
     */
    @Column(name = "PARENT_CODE", length = 64)
    private String pcode;

    /**
     * 字典code
     */
    @Column(name = "DIC_CODE", length = 64)
    private String code;

    /**
     * 字典名称
     */
    @Column(name = "DIC_NAME", length = 2000)
    private String name;
    /**
     * 枚举全称
     */
    @Column(name = "DIC_FULL_NAME")
    private String fullName;
    /**
     * 拼音简称
     */
    @Column(name = "PINYIN_NAME")
    private String pinyinName;
    /**
     * 拼音全称
     */
    @Column(name = "PINYIN_FULL_NAME")
    private String pinyinFullName;

    /**
     * 是否叶子节点
     */
    @Column(name = "LEAF")
    private String leaf;

    /**
     * 级（叶子）字典总数
     */
    @Column(name = "LEAF_total")
    private Integer leafTotal;

    /**
     * 字典-层级
     */
    @Column(name = "LEVEL")
    private String level;


    /**
     * 字典-分级格式
     */
    @Column(name = "LEVEL_FORMAT")
    private String levelFormat;

    /**
     * 是否启用
     */
    @Column(name = "state")
    private String enabled;

    /**
     * 排序
     */
    @Column(name = "sort")
    private Integer order;

    /**
     * 字段描述
     */
    @Column(name = "DESCRIBE")
    private String note;

    /**
     * 创建人ID
     */
    @Column(name = "CREATE_USER_ID")
    private String createUserId;

    /**
     * 创建人姓名
     */
    @Column(name = "CREATE_USER_NAME")
    private String createUserName;

    /**
     * 修改人ID
     */
    @Column(name = "EDIT_USER_ID")
    private String editUserId;

    /**
     * 修改人姓名
     */
    @Column(name = "EDIT_USER_NAME")
    private String editUserName;

    /**
     * 创建时间
     */
    @Temporal(TemporalType.TIMESTAMP)

    @Column(name = "CREATE_TIME")
    private Date createTime;

    /**
     * 修改时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "EDIT_TIME")
    private Date editTime;

    /**
     * 创建组织
     */
    @Column(name = "CREATE_ORG_CODE")
    private String createOrgCode;

    /**
     * 修改组织
     */
    @Column(name = "EDIT_ORG_CODE")
    private String editOrgCode;

    /**
     * 创建单位名称
     */
    @Column(name = "CREATE_ORG_NAME")
    private String createOrgName;

    /**
     * 修改单位名称
     */
    @Column(name = "EDIT_ORG_NAME")
    private String editOrgName;

    /**
     * 创建人IP
     */
    @Column(name = "CREATE_IP")
    private String createIp;

    /**
     * 修改人IP
     */
    @Column(name = "EDIT_IP")
    private String editIp;

}